home *** CD-ROM | disk | FTP | other *** search
/ OpenGL Superbible (2nd Edition) / OpenGL SuperBible e2.iso / tools / GLUT-3.7 / LIB / GLSMAP / smap_origin.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-12  |  813 b   |  35 lines

  1.  
  2. /* Copyright (c) Mark J. Kilgard, 1998.  */
  3.  
  4. /* This program is freely distributable without licensing fees
  5.    and is provided without guarantee or warrantee expressed or
  6.    implied. This program is -not- in the public domain. */
  7.  
  8. #include <GL/glsmap.h>
  9.  
  10. #include "glsmapint.h"
  11.  
  12. void smapSetViewOrigin(SphereMap *smap, GLint x, GLint y)
  13. {
  14.         smap->viewOrigin[0] = x;
  15.         smap->viewOrigin[1] = y;
  16. }
  17.  
  18. void smapSetSphereMapOrigin(SphereMap *smap, GLint x, GLint y)
  19. {
  20.         smap->smapOrigin[0] = x;
  21.         smap->smapOrigin[1] = y;
  22. }
  23.  
  24. void smapGetViewOrigin(SphereMap *smap, GLint *x, GLint *y)
  25. {
  26.         *x = smap->viewOrigin[0];
  27.         *y = smap->viewOrigin[1];
  28. }
  29.  
  30. void smapGetSphereMapOrigin(SphereMap *smap, GLint *x, GLint *y)
  31. {
  32.         *x = smap->smapOrigin[0];
  33.         *y = smap->smapOrigin[1];
  34. }
  35.